package com.czk.springcloud.service;

import com.czk.springcloud.entity.CommonResult;
import com.czk.springcloud.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * feign的客户端
 *
 * @Author:ChenZhangKun
 * @Date: 2020/12/26 21:14
 */
@FeignClient(value = "nacos-payment-provider", fallback = PaymentFallbackService.class)
public interface PaymentService {
    /**
     * feign客户端
     * @param id
     * @return
     */
    @GetMapping("/payment/sql/{id}")
    public CommonResult<Payment> paymentSql(@PathVariable("id") Long id);
}
